package com.shamar.blog.dto;

import com.shamar.blog.entity.BlogCategory;
import com.shamar.blog.enums.BlogCategoryStateEnum;

import java.util.List;

/**
 * 封装执行后结果
 */
public class BlogCategoryExecution {

	// 结果状态
	private int state;

	// 状态标识
	private String stateInfo;

	// 用户数量
	private int count;

	// 操作的用户（修改用户的时候用）
	private BlogCategory blogCategory;

	// 获取的User列表(查询用户的时候用)
	private List<BlogCategory> blogCategoryList;

	//空参构造器
	public BlogCategoryExecution() {
	}

	// 失败的构造器
	public BlogCategoryExecution(BlogCategoryStateEnum stateEnum) {
		this.state = stateEnum.getState();
		this.stateInfo = stateEnum.getStateInfo();
	}

	// 成功的构造器
	public BlogCategoryExecution(BlogCategoryStateEnum stateEnum, BlogCategory blogCategory) {
		this.state = stateEnum.getState();
		this.stateInfo = stateEnum.getStateInfo();
		this.blogCategory = blogCategory;
	}

	// 成功的构造器
	public BlogCategoryExecution(BlogCategoryStateEnum stateEnum, List<BlogCategory> blogCategoryList) {
		this.state = stateEnum.getState();
		this.stateInfo = stateEnum.getStateInfo();
		this.blogCategoryList = blogCategoryList;
	}

	public int getState() {
		return state;
	}

	public void setState(int state) {
		this.state = state;
	}

	public String getStateInfo() {
		return stateInfo;
	}

	public void setStateInfo(String stateInfo) {
		this.stateInfo = stateInfo;
	}

	public int getCount() {
		return count;
	}

	public void setCount(int count) {
		this.count = count;
	}

	public BlogCategory getBlogCategory() {
		return blogCategory;
	}

	public void setBlogCategory(BlogCategory blogCategory) {
		this.blogCategory = blogCategory;
	}

	public List<BlogCategory> getBlogCategoryList() {
		return blogCategoryList;
	}

	public void setBlogCategoryList(List<BlogCategory> blogCategoryList) {
		this.blogCategoryList = blogCategoryList;
	}
}